package com.cn.springcloudwechat.mapper.mapper.order;

import com.cn.springcloudwechat.common.mybatis.Page;
import com.cn.springcloudwechat.model.order.YmOrderGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**  订单商品详情
*@program: YmOrderGoodsMapper
*@author: Administrator
*@create: 2018-07-31 18:29
*/
@Repository
public interface YmOrderGoodsMapper {

    /**
     *  添加订单商品详情
     * @param record
     * @return
     */
    void insertSelective(YmOrderGoods record);

    /**
     *  根据商品ID 查询商品
     * @param goodsIdDesc
     * @return
     */
    YmOrderGoods selectByPrimaryKey(Long goodsIdDesc);

    /**
     *  更新订单商品详情
     * @param record
     */
    void updateByPrimaryKeySelective(YmOrderGoods record);

    /**
     *  批量获取商品数据
     * @param record
     * @return
     */
    List<Object> getAllYmOrderGoods(@Param("record") YmOrderGoods record, Page<Object> page);

    /**
     *  根据订单id查询商品详情
     * @param orderId
     * @return
     */
    List<YmOrderGoods>getOrderGoodsByOrderId(Long orderId);


}